home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c / 381 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.3 KB

  1. Path: hickory.westol.com!news
  2. From: Mark Kintigh <breetai@oak.westol.com>
  3. Newsgroups: comp.std.c
  4. Subject: Re: "c" question.
  5. Date: Wed, 14 Feb 1996 15:07:18 -0800
  6. Organization: Westmoreland Online Inc.
  7. Message-ID: <31226B26.3E22@oak.westol.com>
  8. References: <312048DF.4E51@vast.cs.byu.edu>
  9. NNTP-Posting-Host: pm127.westol.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0b6b (Win16; I)
  14.  
  15. William Donald Peterson III wrote:
  16. > I have a question.  I was wondering if anybody knows how to display a
  17. > character that is not on the keyboard, but is in the alphabet.  For
  18. > example, if I wanted to "printf" the 129th ascii character.
  19.  
  20. C treats int and char the same.  If you want to load int x with 'A' just
  21. type "x='A';".  For your printf example you can do this a number of ways
  22.     ie: printf("..%c..",129);
  23.         printf("...\201..");    /* octal value of 129 */
  24.             :
  25.  
  26. -- 
  27.      _____
  28.     /    /##                 breetai@oak.westol.com
  29.    /    /####                                                     ____
  30.   (| []/ o ##)    "We met the enemy, and they were'nt us, then   | _|||
  31. |\ \_/ /\   # /|  we faced a pannel of 'us' and found they were  ||  ||
  32. | \-\ ==== /-/ |                    the enemy."                   \\//
  33. ||\\ '----' //||                                                   \/
  34. || \\/    \// ||
  35.